PROJECT(yaml-parser)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

SET(CMAKE_BUILD_TYPE Debug)
SET(CMAKE_C_FLAGS "-Wall -std=c11")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -O0 -g -ggdb")
SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} -O3")

SET(CMAKE_CXX_FLAGS "-Wall -std=c++11")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} -O0 -g -ggdb")
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -O3")
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/tbin)
SET(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/tlib)

# 包含外部源文件目录
SET(INC_DIRS 
	./include
	./data
	./src
	)
FOREACH(INC_DIR ${INC_DIRS})
	INCLUDE_DIRECTORIES(${INC_DIR})
	AUX_SOURCE_DIRECTORY(${INC_DIR} SRC_FILES_yaml-parser)
ENDFOREACH()

# 添加外部库文件目录(FIND_LIBRARY is better)
LINK_DIRECTORIES(
	)

# ADD_SUBDIRECTORY(tests)

ADD_EXECUTABLE(yaml-parser ${SRC_FILES_yaml-parser} tests/run-parser.c)
TARGET_LINK_LIBRARIES(yaml-parser
	
	)
